#include "State.h"
#include "Context.h"
#include <iostream>
namespace StateMode
{
    void ConcreteStateA::Handle(Context* context)
    {
        std::cout<<"当前状态是 A."<<std::endl;
        context->setState(new ConcreteStateB());        
    }

    void ConcreteStateB::Handle(Context* context)
    {
        std::cout<<"当前状态是 B."<<std::endl;
        context->setState(new ConcreteStateA());        
    }    
}